<?php
unset($_SESSION['login']);
unset($_SESSION['password']);
unset($_SESSION['userid']);
unset($_SERVER['PHP_AUTH_USER']);
unset($_SERVER['PHP_AUTH_PW']);
$_SESSION['reregister'] = true;
header('Location: ' . $_SERVER['HTTP_REFERER']);
?>